-
Notifications
You must be signed in to change notification settings - Fork 123
Add support for downloading logs by migration ID #1455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Unit Test Results 1 files 1 suites 10m 25s ⏱️ Results for commit f68edcb. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for downloading migration logs using a --migration-id parameter as an alternative to specifying --github-org and --github-repo, addressing the scenario where users have a migration ID but the migration isn't found via org/repo lookup.
Key changes:
- Made
--github-organd--github-repooptional parameters in all three CLI commands (gei, ado2gh, bbs2gh) - Added new
--migration-idoption that allows direct log download by migration ID - Implemented mutual exclusivity validation: either migration-id OR both org/repo must be provided
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
src/gei/Commands/DownloadLogs/DownloadLogsCommand.cs |
Removed IsRequired = true from GithubRepo and GithubOrg options |
src/Octoshift/Commands/DownloadLogs/DownloadLogsCommandBase.cs |
Added MigrationId option and removed IsRequired from base options |
src/Octoshift/Commands/DownloadLogs/DownloadLogsCommandArgs.cs |
Added MigrationId property to command arguments |
src/Octoshift/Commands/DownloadLogs/DownloadLogsCommandHandler.cs |
Implemented validation and dual-path logic for migration-id vs org/repo lookup |
src/OctoshiftCLI.Tests/gei/Commands/DownloadLogs/DownloadLogsCommandTests.cs |
Updated test to reflect new option count and optional parameters |
src/OctoshiftCLI.Tests/bbs2gh/Commands/DownloadLogs/DownloadLogsCommandTests.cs |
Updated test to reflect new option count and optional parameters |
src/OctoshiftCLI.Tests/ado2gh/Commands/DownloadLogs/DownloadLogsCommandTests.cs |
Updated test to reflect new option count and optional parameters |
RELEASENOTES.md |
Added release note describing the new --migration-id feature |
Comments suppressed due to low confidence (1)
src/Octoshift/Commands/DownloadLogs/DownloadLogsCommandHandler.cs:85
- This assignment to State is useless, since its value is never read.
This assignment to WarningsCount is useless, since its value is never read.
This assignment to FailureReason is useless, since its value is never read.
var (State, RepositoryName, WarningsCount, FailureReason, MigrationLogUrl) = migrationResult.Result;
src/Octoshift/Commands/DownloadLogs/DownloadLogsCommandHandler.cs
Outdated
Show resolved
Hide resolved
src/Octoshift/Commands/DownloadLogs/DownloadLogsCommandHandler.cs
Outdated
Show resolved
Hide resolved
src/Octoshift/Commands/DownloadLogs/DownloadLogsCommandHandler.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…dHandler.cs" This reverts commit 5acd9c4.
… local variable Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Adds support for downloading migration logs using a
--migration-idparameter as an alternative to specifying--github-organd--github-repo. This addresses the original issue where users couldn't download logs when they had a migration ID but the migration wasn't found via org/repo lookup.Usage
New migration ID approach:
Existing org/repo approach (unchanged):
ThirdPartyNotices.txt(if applicable)